//
// Created by Semir on 2020/4/25.
//

#include <iostream>

using namespace std;

const int MAX_N = 35;
const int MAX_M = 35;
int n, m;
int dp[MAX_M][MAX_N];

int main() {
    cin >> n >> m;
    dp[0][0] = 1;
    for (int i = 1; i <= m; i++) {
        for (int j = 0; j < n; j++) {
            dp[i][j] = dp[i - 1][(j - 1 + n) % n] + dp[i - 1][(j + 1) % n];
        }
    }
    cout << dp[m][0] << endl;
    return 0;
}